#include "point3d.hpp"

Point3d::Point3d()
{
    _x = _y = _z = 0.0;
    _red = .5;
    _green = .5;
    _blue = .5;

}

// Initialise valeurs des points
void Point3d::initPoint(float x, float y, float z)
{
    setX(x);
    setY(y);
    setZ(z);
}

void Point3d::setX(float x)
{
    _x = x;
}

void Point3d::setY(float y)
{
    _y = y;
}

void Point3d::setZ(float z)
{
    _z = z;
}

// Initialise couleur des points
void Point3d::initRGB(double r, double g, double b)
{
    setR(r);
    setG(g);
    setB(b);
}

void Point3d::setR(double r)
{
    _red = r;
}

void Point3d::setG(double g)
{
    _green = g;
}

void Point3d::setB(double b)
{
    _blue = b;
}


// Récupère valeurs des points
float Point3d::getX()
{
    return _x;
}

float Point3d::getY()
{
    return _y;
}

float Point3d::getZ()
{
    return _z;
}

// Récupère couleur des points
double Point3d::getR()
{
    return _red;
}

double Point3d::getG()
{
    return _green;
}

double Point3d::getB()
{
    return _blue;
}
